import React, {Component} from 'react';
import './404.scss'
import {connect} from 'react-redux'
import {Link} from 'react-router-dom'

class NotFound extends Component {
    onBack = () => {
        this.props.Tophistory.goBack();
    }

    render() {
        return (
            <div>
                <img src={require('../../static/img/public/404.jpg')} alt=""/>
                <Link to='/'><button className='back404' >返回上一页</button></Link>
            </div>
        )
    }
}

const mapStateToProps = (state) => {
    let routehistory = state.publics.routehistory;

    return {
        Tophistory: routehistory
    }

}

export default connect(mapStateToProps)(NotFound)